
Partial Class MasterPage
    Inherits System.Web.UI.MasterPage

    Protected Sub Signout_btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Signout_btn.Click
        Session.RemoveAll()
        Response.Redirect("~/SignIn.aspx")
    End Sub

    'Private Sub Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles NewBusiness_btn.Click, Accounting_btn.Click, ClientServicing_btn.Click, ManagementInformation_btn.Click
    '    Dim btn As LinkButton = sender

    '    Select Case btn.ID
    '        Case "NewBusiness_btn"
    '            Response.Redirect("~/New_Business/Search_Policies.aspx")
    '        Case "ClientServicing_btn"
    '            Response.Redirect("~/Client_Servicing/Search_Policies.aspx")

    '    End Select
    'End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Dim s As Integer = 0
        Dim l As Integer = 0

        s = InStr(6, Request.FilePath, "/") + 1
        l = InStr(s, Request.FilePath, "/")

        NewBusiness_btn.ForeColor = Drawing.Color.FromName("#0C58A2")
        Accounting_btn.ForeColor = Drawing.Color.FromName("#0C58A2")
        ClientServicing_btn.ForeColor = Drawing.Color.FromName("#0C58A2")
        ManagementInformation_btn.ForeColor = Drawing.Color.FromName("#0C58A2")
        Admin_btn.ForeColor = Drawing.Color.FromName("#0C58A2")

        If s <> 0 And l <> 0 Then

            Dim strFolder As String = Mid(Request.FilePath, s, l - s)

            Select Case strFolder
                Case "Client_Servicing"
                    ClientServicing_btn.ForeColor = Drawing.Color.Black
                Case "New_Business"
                    NewBusiness_btn.ForeColor = Drawing.Color.Black
                Case "Accounting"
                    Accounting_btn.ForeColor = Drawing.Color.Black
                Case "Management_Info"
                    ManagementInformation_btn.ForeColor = Drawing.Color.Black
            End Select
        End If
    End Sub
End Class

